package com.xixi.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xixi.entity.OperationLog;
import com.xixi.mapper.OperaterMapper;
import com.xixi.pojo.query.OperationQueryParm;
import com.xixi.pojo.vo.OperationVO;
import com.xixi.service.OperaterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OperaterServiceImpl implements OperaterService {

    @Autowired
    private OperaterMapper operaterMapper;
    @Override
    public void insert(OperationLog log) {
        operaterMapper.insert(log);
    }

    @Override
    public IPage<OperationVO> page(OperationQueryParm operationQueryParm) {
        IPage<OperationVO> page = new Page<>(operationQueryParm.getPageNum(), operationQueryParm.getPageSize());
        return operaterMapper.page(page, operationQueryParm);
    }
}